<?php

namespace App\Model\DesignPattern\Creational\Behavioral\Command;

class Off implements Command
{
    protected $bulb;

    public function __construct(Bulb $bulb)
    {
        $this->bulb = $bulb;
    }

    public function exec()
    {
        return $this->bulb->off();
    }

    public function undo()
    {
        return $this->bulb->on();
    }


    public function redo()
    {
        return $this->exec();
    }
}
